#!/usr/bin/python
import sys
from scapy.all import *
import time
 
iface="eth0"
if len(sys.argv)>=2:
    iface=sys.argv[1]
while(1):
    packet= Ether(src=RandMAC("*:*:*:*:*:*"),
                  dst=RandMAC("*:*:*:*:*:*")) / \
    IP(src=RandIP("*.*.*.*"),
    dst=RandIP("*.*.*.*")) / \
    ICMP()
    time.sleep(0.5)
    sendp(packet,iface=iface,loop=0)